#nullable enable
using System.Collections.Generic;

namespace AndroidUnevenRoadGame.Game
{
    public enum CardType
    {
        Attack,
        Skill,
        Power,
        Status,
        Curse
    }

    public sealed record CardDefinition(
        string Id,
        string Name,
        CardType Type,
        int Cost,
        string Description,
        IReadOnlyDictionary<string, float> Parameters,
        string? UpgradeToId)
    {
        public float GetParameter(string key, float defaultValue = 0f)
        {
            return Parameters != null && Parameters.TryGetValue(key, out var value)
                ? value
                : defaultValue;
        }
    }
}

